<?php

class Buyback_Resource_Cart_ValidItem extends Buyback_Resource_Cart_Item{
	
	/**
	 * @var Buyback_Resource_Offer_Price
	 */
	public $Offers;
	/**
	 * @vars Buyback_Resouce_Offer_Dimensions
	 */
	public $Dimensions;
	
	public $Quantity;
	public $MaxQnty;
	public $ItemTypeObject;
	
	public function __construct($item){
		parent::__construct($item->ItemType, $item->Isbn13);
		
		$this->Offers = $item->Offers;
		$this->Dimensions = $item->Dimensions;
		$this->Quantity = $item->Quantity;
		$this->MaxQnty = $item->MaxQnty;
		
		$objectName = "Buyback_Resource_ItemType_" . $item->ItemType;
		$this->ItemTypeObject = new $objectName($item);		
	}
}